package main.java.employee;

import java.math.BigDecimal;

/**
 * Author: Tristan
 * Date: 2023/6/25 16:11
 */
public class TaxTable {

    private Integer id;

    private Integer level;

    private BigDecimal lower;

    private BigDecimal upper;

    private BigDecimal rate;




    // 获得该阶梯最大税额
    public BigDecimal getMaxTaxValue() {
        return upper.subtract(lower).multiply(rate);
    }




    public TaxTable(Integer id, Integer level, BigDecimal lower, BigDecimal upper, BigDecimal rate) {
        this.id = id;
        this.level = level;
        this.lower = lower;
        this.upper = upper;
        this.rate = rate;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public BigDecimal getLower() {
        return lower;
    }

    public void setLower(BigDecimal lower) {
        this.lower = lower;
    }

    public BigDecimal getUpper() {
        return upper;
    }

    public void setUpper(BigDecimal upper) {
        this.upper = upper;
    }

    public BigDecimal getRate() {
        return rate;
    }

    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }


}
